package com.css.attachment.entity;

import lombok.Data;

import java.util.List;

/**
 * @author Dbj
 * @date 2024年08月30日  13:43
 */
@Data
public class ParsingResult {
    //校验结果 ok为成功
    private String message;
    //解析出来的shp数据
    private List<List<Object>> shpList;
    //解析出来的tif数据
    private List<List<Object>> tifList;
    //解析出来的tif数据长度
    private int tifCount;
    //解析出来的excel数据
    private List<List<String>> excelList;

    public ParsingResult(String message, List<List<Object>> shpList, List<List<Object>> tifList, int tifCount, List<List<String>> excelList) {
        this.message=message;
        this.shpList=shpList;
        this.tifList=tifList;
        this.excelList=excelList;
        this.tifCount=tifCount;
    }

    //获取shp的数据
    public static ParsingResult shpData(String message, List<List<Object>> list) {
        return new ParsingResult(message, list,null,0,null);
    }
    //获取tif的数据
    public static ParsingResult tifData(String message, List<List<Object>> list, int tifCount) {
        return new ParsingResult(message, null,list,tifCount,null);
    }

    //获取excel的数据
    public static ParsingResult excelData(String message, List<List<String>> list) {
        return new ParsingResult(message, null,null,0,list);
    }
}
